package cn.hxth.cloud.provider.controller;

import cn.hxth.cloud.api.domain.OrderInfo;
import cn.hxth.cloud.provider.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/order/")
public class OrderController {

    @Autowired
    private OrderService orderService ;
    @PostMapping("insertOrder")
    public  Boolean insertOrder(@RequestBody OrderInfo orderInfo,@RequestParam("mid") String mid) throws Exception {

         ;
        return  this.orderService.insertOrder(orderInfo,mid) ;

    }
    @PutMapping("updateStatus/{id}")
    public Boolean updateStatus(@RequestBody OrderInfo orderInfo){
        return  this.orderService.updateStatus(orderInfo) ;
    }
}
